const DB_NAME = 'lc_app.db';
const BASE_DB_NAME = 'base.db'; //应用基础库名称
const BASE_DB_FOLDER_NAME = 'base'; //基础库的文件夹名
/*数据库表名*/

const TB_SEARCH_HISTORY = 'tb_search_history'; //搜索历史记录表
const TB_APPLE_PAY_HISTORY = 'tb_apple_pay_history'; //苹果支付记录
const TB_UPGRADE_RECORD = 'tb_app_upgrade_record'; //APP升级记录表

class SqlConstants {
  ///TODO 添加建表sql
  static List createTable = [
    createTbApplePay,
    createTbSearchHistory,
  ];
  static List createTableBase = [
    createTbAppUpgradeRecord
  ];

  ///其他可执行sql
}

/*苹果充值记录*/
String createTbApplePay =
    'CREATE TABLE IF NOT EXISTS "$TB_APPLE_PAY_HISTORY" (' //创建表的sql
        ' "product_id" TEXT,' //商品ID
        +
        ' "create_time" INTEGER,' //创建时间
        +
        ' "order_id" INTEGER PRIMARY KEY NOT NULL);'; //订单ID


/*搜索历史记录表*/
String createTbSearchHistory =
    'CREATE TABLE IF NOT EXISTS "$TB_SEARCH_HISTORY" (' //创建表的sql
        ' "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,' //主键Id（自增）
        +
        ' "record" TEXT,' //查询记录
        +
        ' "extra" TEXT,' //额外字段
        +
        ' "module" TEXT);'; //所属模块

/*升级记录表*/
String createTbAppUpgradeRecord =
    'CREATE TABLE IF NOT EXISTS "$TB_UPGRADE_RECORD" (' //创建表的sql
        ' "version_code" INTEGER PRIMARY KEY  NOT NULL,' //版本号
        +
        ' "version_name" TEXT,' //版本名称
        +
        ' "platform" TEXT,' //系统信息 ios或android
        +
        ' "app_id" TEXT,' //app_id
        +
        ' "ignore" INTEGER,' //0忽略，1更新
        +
        ' "last_remind" INTEGER);'; //最后提醒时间
